//
//  ZXFDCSelectedView.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/22.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "ZXFDCSelectedView.h"

@implementation ZXFDCSelectedView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self initSubView];
    }
    return self;
}

- (void)initSubView{
    self.layer.borderColor  = LINCOLOR.CGColor;
    self.layer.borderWidth = 1;
    self.layer.masksToBounds = YES;
    self.layer.cornerRadius = 2;
    [self addSubview:self.nameLabel];
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo (@10);
        make.right.equalTo(@0).offset(-30);
        make.centerY.equalTo(self.mas_centerY);
        make.height.equalTo(@30);
    }];
    [self addSubview:self.rightImageView];
    [_rightImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(@0).offset(-10);
        make.width.equalTo(@10);
        make.height.equalTo(@8);
        make.centerY.equalTo(self.mas_centerY);
    }];
}
//助教
- (UILabel *)nameLabel{
    if (!_nameLabel) {
        UILabel *label = [[UILabel alloc]init];
        label.text  = @"选择助教";
        label.font = [UIFont systemFontOfSize:12];
        label.textColor = TITLECOLOR;
        label.textAlignment = 0;
        _nameLabel = label;
    }
    return _nameLabel;
}
- (UIImageView *)rightImageView{
    if (!_rightImageView) {
        UIImageView *imageView = [[UIImageView alloc]init];
        imageView.image = [UIImage imageNamed:@"fd_sanJiao"];
        _rightImageView = imageView;
    }
    return _rightImageView;
}
@end
